This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2001-250311, filed on Aug. 21, 2001, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a part program generating apparatus and program for image measuring apparatus. The apparatus and program utilizes an offline teaching system that can offline generate a part program for an image measuring apparatus simply, collectively and automatically on the basis of shape data of a work to be measured without the use of the real machine.
2. Description of the Related Art
In the conventional offline teaching for a CNC (computer numerical control)image measuring apparatus, two-dimensional CAD data is displayed on a screen. Then, an operator selects a graphical element to be measured using a mouse and the like. The operator also determines which edge detection tool should be employed to measure the graphical element, and further determines and inputs where the edge detection position should be settled in the edge detection tool to generate a part program.
In the conventional part program generator (generating program) for an image measuring apparatus, if a measurement target graphic is selected, an edge detection tool for detecting the selected graphic is chosen and located automatically or manually. Such the edge detection tool includes a simple tool, a circular tool and a box tool, for example. An example of the simple tool is shown in FIG. 20. The simple tool 71 is employed to detect a point as an edge point where the density level sharply changes when an image obtained by imaging a work is scanned along the arrow from the base to the tip. If the simple tool is employed, it is required to set the number and locations of arrows, lengths W (the number of pixels) and the number of offsets.
In the conventional image measuring apparatus, the number and locations of arrows are previously entered at the measurement condition input stage as default values, which are basically employed to reduce loads on operations. Depending on the target graphic, however, it may be often desired to use a different value from the default value. In the conventional image measuring apparatus, if the default value is to be changed, the selected target graphic is enlarged first, and then the number and locations of arrows are adjusted in the enlarged graphic using a mouse, for example. Such the setting performed on the basis of the enlarged target graphic, however, makes the operation for instructing the enlarged display troublesome. In addition, the enlarged display makes it difficult to identify the position of the enlarged section relative to the entire. This causes an operational problem such as a difficulty in determination on where the arrow is placed, for example.
A first aspect of the invention is provided with an apparatus for generating a part program with description of measurement procedures to be used in an image measuring apparatus for measuring a work based on image data obtained by imaging the work. The apparatus comprises CAD data input means for reading CAD data of the work; CAD data display means for graphically displaying the CAD data read by the CAD data input means; means for selecting a target graphic from the CAD data displayed on the CAD data display means; and means for determining a location to place an edge detection tool on the selected target graphic, in which the CAD data is displayed on the CAD data display means at a certain magnification that allows the position of the selected target graphic to be identified relative to the entire of the CAD data, a detection position mark is displayed in the vicinity of the target graphic, and the location of the detection position mark is determined by the operator. A part program for measuring the target graphic is generated based on a result determined by the means for determining.
According to the first aspect of the invention, the means for selecting is employed to select a target graphic from the CAD data read and displayed. The target graphic is displayed at a certain magnification that allows the position of the target graphic to be identified relative to the entire of the CAD data. In addition, a detection position mark is displayed in the vicinity of the target graphic. The operator can determine the location of the detection position mark using the means for determining. Thus, the operator can freely determine the position of the edge detection tool to be located on the target graphic and locate the detection tool on an appropriate location while grasping the position of the target graphic relative to the work. It is also possible to reduce the numbers of operations of enlargement and reduction.
A second aspect of the invention is provided with a program for generating a part program with description of measurement procedures to be used in an image measuring apparatus for measuring a work based on image data obtained by imaging the work. The program comprises the execution steps of: reading CAD data of the work; graphically displaying the CAD data read; selecting a target graphic from the CAD data displayed; determining a location to place an edge detection tool on the selected target graphic, in which the CAD data is displayed at a certain magnification that allows the position of the selected target graphic to be identified relative to the entire of the CAD data, a detection position mark is displayed in the vicinity of the target graphic,and the location of the detection position mark is determined by the operator; and generating a part program for measuring the target graphic based on the determined result.